<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:wug="http://wug.jp/2009/wug">
<body>
<wug:e wug:export="jp.wug.samples.export.Tree">
    <wug:e wug:if="isEditing">
        <form wug:form="editForm">
            <label wug:for="name">Name:</label><input wug:input="name"/>
            <wug:e wug:catch="IllegalArgumentException,name">${toString}</wug:e>
            <br/>
            <ul>
                <li wug:render="renderChildren,getChild">
                    <label wug:for="name">Name:</label><input wug:input="name"/>
                    <input wug:submit="delete" type="submit" value="Delete"/>
                    <wug:e wug:catch="IllegalArgumentException,name">${toString}</wug:e>
                    <br/>
                </li>
            </ul>
            <input wug:submit="addChild" type="submit" value="Add Child"/>
            <input wug:submit="submit" type="submit" value="Submit"/>
        </form>
    </wug:e>
    <wug:e wug:if-not="isEditing">
        <wug:e wug:if="canEdit"><a wug:action="edit">${name}</a></wug:e>
        <wug:e wug:if-not="canEdit">${name}</wug:e>
        <ul>
            <wug:e wug:render="renderChildren,getChild">
                <li wug:import="asTree,/export/tree.html">child...</li>
            </wug:e>
        </ul>
    </wug:e>
</wug:e>
</body>
</html>
